// VueshopAdminServiceImpl.java -> AdminServiceImpl.java
package edu.gdkm.service.impl;


import edu.gdkm.service.iface.AdminService;
import edu.gdkm.sql.dao.AdminMapper;
import edu.gdkm.sql.pojo.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;

    @Override
    public List<Admin> findAll() {
        return adminMapper.findAll();
    }

    @Override
    public Admin findById(Integer id) {
        return adminMapper.findById(id);
    }

    @Override
    public void save(Admin admin) {
        adminMapper.insert(admin);
    }

    @Override
    public void update(Admin admin) {
        adminMapper.update(admin);
    }

    @Override
    public void delete(Integer id) {
        adminMapper.delete(id);
    }
}
